package 字符串.easy;

/**
 * @author Lw中
 * @date 2020/10/5 8:15
 */
public class Mst0101 {

    /**
     * 判定字符是否唯一
     * @param astr
     * @return
     */
    public static boolean isUnique(String astr) {
        int length = astr.length();
        for (int i = 0; i < length; i++) {
            for (int j = i + 1; j < length; j++) {
                if (astr.charAt(i) == astr.charAt(j)) {
                    return false;
                }
            }
        }
        return true;
    }

    public static void main(String[] args) {
        boolean leetcode = isUnique("bacd");
        System.out.println(leetcode);
    }

}
